package com.woniu.coupon.domain;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 优惠券对象 tb_coupon
 * 
 * @author yy
 * @date 2023-04-03
 */
@ApiModel(value = "Coupon", description = "优惠券")
public class Coupon implements Serializable
{
    private static final long serialVersionUID = 1L;

    /** 主键 */
    @ApiModelProperty("主键")
    private Long id;

    /** 使用描述 */
    @Excel(name = "使用描述")
    @ApiModelProperty("使用描述")
    private String description;

    /** 优惠券类别 1-新人优惠券 2-折扣券 3-满减券 */
    @Excel(name = "优惠券类别 1-新人优惠券 2-折扣券 3-满减券")
    @ApiModelProperty("优惠券类别 1-新人优惠券 2-折扣券 3-满减券")
    private Long couponCategory;

    /** 优惠券发放开始时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "优惠券发放开始时间", width = 30, dateFormat = "yyyy-MM-dd")
    @ApiModelProperty("优惠券发放开始时间")
    private Date issueStartDate;

    /** 优惠券发放结束时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "优惠券发放结束时间", width = 30, dateFormat = "yyyy-MM-dd")
    @ApiModelProperty("优惠券发放结束时间")
    private Date issueEndDate;

    /** 使用有效期有多少天 */
    @Excel(name = "使用有效期有多少天")
    @ApiModelProperty("使用有效期有多少天")
    private Long validDuration;

    /** 折扣：0.9代表九折，0.85代表八五折 */
    @Excel(name = "折扣：0.9代表九折，0.85代表八五折")
    @ApiModelProperty("折扣：0.9代表九折，0.85代表八五折")
    private BigDecimal discountRate;

    /** 减免金额数量 */
    @Excel(name = "减免金额数量")
    @ApiModelProperty("减免金额数量")
    private BigDecimal deductionAmount;

    /** 可以使用满减券的订单最低金额 */
    @Excel(name = "可以使用满减券的订单最低金额")
    @ApiModelProperty("可以使用满减券的订单最低金额")
    private BigDecimal totalAmount;

    /** 发放数量 */
    @Excel(name = "发放数量")
    @ApiModelProperty("发放数量")
    private Long issuedCount;

    /** 真实被领取数量 */
    @Excel(name = "真实被领取数量")
    @ApiModelProperty("真实被领取数量")
    private Long gotCount;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setDescription(String description) 
    {
        this.description = description;
    }

    public String getDescription() 
    {
        return description;
    }
    public void setCouponCategory(Long couponCategory) 
    {
        this.couponCategory = couponCategory;
    }

    public Long getCouponCategory() 
    {
        return couponCategory;
    }
    public void setIssueStartDate(Date issueStartDate) 
    {
        this.issueStartDate = issueStartDate;
    }

    public Date getIssueStartDate() 
    {
        return issueStartDate;
    }
    public void setIssueEndDate(Date issueEndDate) 
    {
        this.issueEndDate = issueEndDate;
    }

    public Date getIssueEndDate() 
    {
        return issueEndDate;
    }
    public void setValidDuration(Long validDuration) 
    {
        this.validDuration = validDuration;
    }

    public Long getValidDuration() 
    {
        return validDuration;
    }
    public void setDiscountRate(BigDecimal discountRate) 
    {
        this.discountRate = discountRate;
    }

    public BigDecimal getDiscountRate() 
    {
        return discountRate;
    }
    public void setDeductionAmount(BigDecimal deductionAmount) 
    {
        this.deductionAmount = deductionAmount;
    }

    public BigDecimal getDeductionAmount() 
    {
        return deductionAmount;
    }
    public void setTotalAmount(BigDecimal totalAmount) 
    {
        this.totalAmount = totalAmount;
    }

    public BigDecimal getTotalAmount() 
    {
        return totalAmount;
    }
    public void setIssuedCount(Long issuedCount) 
    {
        this.issuedCount = issuedCount;
    }

    public Long getIssuedCount() 
    {
        return issuedCount;
    }
    public void setGotCount(Long gotCount) 
    {
        this.gotCount = gotCount;
    }

    public Long getGotCount() 
    {
        return gotCount;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("description", getDescription())
            .append("couponCategory", getCouponCategory())
            .append("issueStartDate", getIssueStartDate())
            .append("issueEndDate", getIssueEndDate())
            .append("validDuration", getValidDuration())
            .append("discountRate", getDiscountRate())
            .append("deductionAmount", getDeductionAmount())
            .append("totalAmount", getTotalAmount())
            .append("issuedCount", getIssuedCount())
            .append("gotCount", getGotCount())
            .toString();
    }
}
